<style>
    th,td
    {
        text-align:center;
    }
</style>
<!--<script src="O2OAdministrator/api/socket.io/socket.io.js"></script>-->
<div style="margin:0 auto;">
    <div style="margin-top:20px;">
    <!--<h1 style="text-align: center">Merchant inprocess</h1>-->

    <table class="table table-bordered" align="center">
        <thead>
        <th>index</th><th>mName</th><th>shopName</th><th>address</th><th>createTime</th><th>operator</th>
        </thead>
        <tbody>
        <tr ng-repeat="merchant in merchants">
            <td>{{$index+1}}</td>
            <td>{{merchant.mName}}</td>
            <td>{{merchant.shopName}}</td>
            <td>{{merchant.address}}</td>
            <td>{{merchant.createTime | formateDate}}</td>
            <td>
                <button class="btn btn-primary" ng-click="toProcess(merchant)" data-toggle="modal" data-target="#processModal">process</button>
            </td>
        </tr>
        </tbody>
    </table>
    </div>
</div>

<!-- 审核模态框 -->
<div class="modal fade" id="processModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Process Page</h4>
            </div>
            <div class="modal-body form-group">
                <table class="table" id="processMer">
                    <input type="hidden" id="processId" value=""/>
                    <tr>
                        <td>ID-Card：</td>
                        <td><div class="col-sm-10"><img src="{{imgUrl}}{{detailMerchant.imgCard}}{{dateParam}}" width="250px" height="150px" class="img-rounded" ></div></td>
                    </tr>
                    <tr>
                        <td>Head：</td>
                        <td><div class="col-sm-10"><img src="{{imgUrl}}{{detailMerchant.imgHead}}{{dateParam}}" width="250px" height="150px" class="img-rounded" ></div></td>
                    </tr>
                    <tr>
                        <td>Name：</td>
                        <td><div class="col-sm-10"><input type="text" class="form-control" ng-model="detailMerchant.mName" disabled="disabled"/></div></td>
                    </tr>
                    <tr>
                        <td>ShopName：</td>
                        <td><div class="col-sm-10"><input type="text" class="form-control" disabled="disabled" ng-model="detailMerchant.shopName" /></div></td>
                    </tr>
                    <tr>
                        <td>Address：</td>
                        <td>
                            <div class="col-sm-10"><input type="text" ng-model="detailMerchant.address" class="form-control" disabled="disabled"/></div>
                        </td>
                    </tr>
                    <tr>
                        <td>Approval：</td>
                        <td><div class="col-sm-10">
                            <select id="usertype" name="usertype" class="show-tick form-control">
                                <option value="1" selected="selected">Approved</option>
                                <option value="2">Rejected</option>
                            </select></div>
                        </td>
                    </tr>
                    <tr id="rejectReason">
                        <td>Rejected-Reason：</td>
                        <td><div class="col-sm-10">
                            <textarea rows="6" cols="42" id="reasonText" ng-model="detailMerchant.rejectContent" class="form-control" name="bcontent" placeholder="Under 100 words"></textarea>
                        </div>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <button type="button" class="btn btn-primary" id="submitProcess" ng-click="process(detailMerchant)">Submit</button>
            </div>
        </div>
    </div>
</div>